package org.jackysoft.service;

import java.util.Collection;

import org.jackysoft.data.IDataProvider;
import org.jackysoft.entity.AbstractReporter;
import org.jackysoft.entity.ArmDailyProductReporter;
import org.jackysoft.entity.Department;
import org.joda.time.DateTime;
import org.springframework.dao.DataAccessException;
import org.w3c.dom.Document;


public interface ReporterService<T extends AbstractReporter> extends IDataProvider<String,T>{
	
	void setReportType(Class<T> rtype);
		
	void saveUpdate(T t) throws DataAccessException;
	
	/**
	 * 获取某部门指定时间区域内的报表
	 * */
	public Collection<T> gets(DateTime from, DateTime to, Department department)throws DataAccessException;
	
	
	void resetReportData(T t);
    /**
	 * 报表累计是否需要重置
	 * @return true 需要否则反
	 * @param rl 报表类型
	 * */
	boolean resetable(DateTime cal);
	
	T get(DateTime tdate,Department department) throws DataAccessException;
	
	
		
	T prepareSelect(DateTime cal) throws DataAccessException,InstantiationException, IllegalAccessException ;
    	
	String getLast(Department dept);	
	
	void submit(T rpt,boolean finished)  throws DataAccessException;
	/**
	 * jasper xml数据源
	 **/
	Document   w3cDocmentDataSource(String id) throws DataAccessException;	

	

}
